<template>
  <p>App</p>
  <Child :count="count" :age="18" @setCount="count++" />
</template>

<script lang="ts">
import { ref } from "vue";
import Child from "./Child.vue";

export default {
  name: "App",
  // 组合式API入口，所有组合式API的内容都必须写在这个函数中
  // setup初始化渲染就会触发，相当于（取缔） beforeCreate 和 created
  setup() {
    const count = ref(0);

    return {
      count,
    };
  },
  components: {
    Child,
  },
};
</script>
